<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>
<style>

</style>
<script language="javascript" type="text/javascript" src="scripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
	mode : "textareas"
});
</script>

<div id="left">
<h3>请输入您推荐的软件信息:</h3>  
<form method="post" action="editRootTag.html"
    onsubmit="return validaterootTag(this)" name="rootTag">
<spring:bind path="rootTag.tagId">
<input type="hidden" name="id" value="${status.value}"/> 
</spring:bind>
<table class="detail">
<c:if test="${rootTag.tagId ==0}">
<tr>
    <th><label for="tag" class="required">
        <fmt:message key="rootTag.relationTag"/>:</label></th>
    <td>
        <input type="text" name="rtagTitle" 
            id="rtagTitle" value="${rtagTitle}" size="40"/>
    </td>
</tr>
</c:if>
<tr>
    <th><label for="title" class="required">
        <fmt:message key="rootTag.title"/>:</label></th>
    <td>
        <spring:bind path="rootTag.title">
        <input type="text" name="${status.expression}" 
            id="title" value="${status.value}" size="40"/>
        <span class="fieldError">${status.errorMessage}</span>
        </spring:bind>
         <input
				type="button" name="search"  value="是否存在" onclick="javascript:searchTag()"/>
				<div  id="tags"></div>
<script type='text/javascript'>
    function searchTag()
    {
        var tag=$$("title").value;
        $("#tags").html("正在搜索...");
         $("#tags").load("searchTag.ajax",{tag:tag});
    }
</script>		
    </td>
</tr>
<tr>
    <th><label for="url" class="required">
        <fmt:message key="rootTag.mainURL"/>:</label></th>
    <td>
        <spring:bind path="rootTag.mainURL">
        <input type="text" name="${status.expression}" value="${status.value}" size="40"/>
        <span class="fieldError">${status.errorMessage}</span>
        </spring:bind>
    </td>
</tr>
<tr>
    <th><label for="intro" class="required">
        <fmt:message key="rootTag.intro"/>:</label></th>
    <td>
        <spring:bind path="rootTag.intro">
        <textarea name="${status.expression}"  cols="50" rows="15" type="_moz">${status.value}</textarea>
        <span class="fieldError">${status.errorMessage}</span>
        </spring:bind>
    </td>
</tr>
<tr>
    <th><label for="icon">
        <fmt:message key="rootTag.icon"/>:</label></th>
    <td>
        <spring:bind path="rootTag.icon">
        <input type="text" name="${status.expression}" value="${status.value}" size="40"/>
        <span class="fieldError">${status.errorMessage}</span>
        </spring:bind>
    </td>
</tr>

<tr>
    <td></td>
    <td>
        <input type="submit" class="button" name="save" value="保存"/>
      	<input type="button" class="button" name="cancel" value="取消" onclick="javascript:history.back(-1)"/>
    </td>
</tr>
</table>
</form>
</div>

<div id="right">
<jsp:include page="/include/openSite.jsp"/>
</div>

<script type="text/javascript">
    document.forms["rootTag"].elements["title"].focus();
</script>

<v:javascript formName="rootTagForm" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javascript" src="<c:url value="/scripts/validator.jsp"/>"></script>
